﻿// test_10.31.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include<stdio.h>
#include<math.h>
int main(void)
{
    /*********Begin*********/
    float weight, Price, x1, x2;
    int area;
    scanf_s("%d %f", &area, &weight);
    if (weight <= 1 && weight > 0) {
        x1 = 1;
    }
    else {
        x1 = 1;
        x2 = ceil(weight - 1);//ceil为向上取整函数
    }

    if (area >= 0 && area <= 4) {
        switch (area) {
        case 0:
            Price = x1 * 10 + x2 * 3;
            printf("Price: %.2f\n", Price);
            break;
        case 1:
            Price = x1 * 10 + x2 * 4;
            printf("Price: %.2f\n", Price);
            break;
        case 2:
            Price = x1 * 15 + x2 * 5;
            printf("Price: %.2f\n", Price);
            break;
        case 3:
            Price = x1 * 15 + x2 * 6.5;
            printf("Price: %.2f\n", Price);
            break;
        case 4:
            Price = x1 * 15 + x2 * 10;
            printf("Price: %.2f\n", Price);
            break;

        }
    }
    else {
        printf("Error in Area\nPrice:0.00\n");
    }
    /*********End**********/
    return 0;
}